<script type="text/javascript">
    $("#rjwzbm_code").keyup(function(){
        if ($(this).val().length > 3) {
            $(this).val($(this).val().substring(0,3));
        }
        $(this).next().val($(this).prev().html()+$(this).val());
    });
</script>
<form id="wzbmForm" action="${base}/sys/wzbm/rjwzbm" method="post">
    <input type="hidden" name="rjwzbm.id" value="${(rjwzbm.id)!}"/>
    <table style="width:99.7%" class="tb tb-con">
        <col width="10%"/><col width="30%"/><col width="10%"/><col width="30%"/>
        <tr>
            <th style="color:#f45212;">二级物资编码名称:</th>
            <td><input name="rjwzbm.name" type="text" class="easyui-validatebox input-text" required="true" value="${(rjwzbm.name)!}"/></td>
            <th style="color:#f45212;">二级物资编码代码:</th>
            <#--<td><div class="bang"><span class="sp">${(rjwzbm.yjwzbm.code)!}</span>-->
                <#--<input id="rjwzbm_code" type="text" class="easyui-validatebox db" required="true" <#if (rjwzbm.code)??>value="${(rjwzbm.code)?substring(2)}"</#if> validType="fixLength[3]"/>-->
                <#--<input name="rjwzbm.code" type="hidden" value="${(rjwzbm.code)!}"/></div></td>-->
            <td>
                <#if !rjwzbm.code??><span style="65px;">${(rjwzbm.yjwzbm.code)!}</span><input readonly="true" type="text" class="input-text" style="width:112px;"/>
                <#else><input readonly="true" type="text" class="input-text" value="${(rjwzbm.code)!}"/></#if>
            </td>
        </tr>
        <tr>
            <th>所属一级物资编码:</th>
            <td colspan="3"><input name="rjwzbm.yjwzbm.id" type="hidden" value="${(rjwzbm.yjwzbm.id)!}"/>
                <input name="rjwzbm.yjwzbm.name" type="text" class="input-text" style="color:darkgray" disabled="true" value="${(rjwzbm.yjwzbm.name)!}"/></td>
        </tr>
    </table>
    <div style="padding:5px 0;text-align:right;padding-right:30px">
        <a href="#" class="easyui-linkbutton" iconcls="icon-save" plain="true"
           onclick="wzbm_saveItem('${index}','${level}')">保存</a>
        <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" plain="true"
           onclick="wzbm_cancelItem('${index}')">取消</a>
    </div>
</form>